<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<body>
	<ui:composition>
		<div id="listaTree">
			<h:form id="frmTree">
				<p:tree styleClass="menuOpciones" value="#{menuOpcionesMBean.root}"  var="node" dynamic="true"
					animate="true"  rendered="true"  selectionMode="single" selection="#{menuOpcionesMBean.selectedNode}">
					<p:treeNode  expandedIcon="ui-icon-folder-open"
						collapsedIcon="ui-icon-folder-collapsed">
						<h:outputText value="#{node.nombre}" styleClass="menuEstilo" />
					</p:treeNode>
					<p:treeNode  type="document" icon="ui-icon-document"  >
						<h:outputLink value="#{common['path.urlpage']}#{node.url}" styleClass="menuEstiloLink #{(node.codMenu == menuOpcionesMBean.codMenu) ? 'menuItemSelected' : 'otro'}" >
							<h:outputText value="#{node.nombre}" />
							<f:param name="codModulo" value="#{menuOpcionesMBean.codModulo}"/>
							<f:param name="codMenu" value="#{node.codMenu}" />
						</h:outputLink>
					</p:treeNode>
					<p:ajax event="expand" listener="#{menuOpcionesMBean.onNodeExpand}"></p:ajax>
				</p:tree>
			</h:form>
		</div>

	</ui:composition>
</body>
</html>